﻿find_path(CAIRO_INCLUDE_DIR cairo.h PATH_SUFFIXES cairo)
find_library(CAIRO_LIBRARY_RELEASE NAMES cairo)
find_library(CAIRO_LIBRARY_DEBUG NAMES cairoD)

if(CAIRO_LIBRARY_DEBUG)
  set(CAIRO_LIBRARIES optimized ${CAIRO_LIBRARY_RELEASE} debug ${CAIRO_LIBRARY_DEBUG})
else()
  set(CAIRO_LIBRARIES ${CAIRO_LIBRARY_RELEASE})
endif()

if (CAIRO_INCLUDE_DIR AND CAIRO_LIBRARY_RELEASE)
  set(CAIRO_FOUND TRUE)
endif()
